home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / src / swtools / mipsABI / examples / sup / time.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-08-02  |  3.4 KB  |  95 lines

  1. /*
  2.  * Copyright (c) 1991 Carnegie Mellon University
  3.  * All Rights Reserved.
  4.  * 
  5.  * Permission to use, copy, modify and distribute this software and its
  6.  * documentation is hereby granted, provided that both the copyright
  7.  * notice and this permission notice appear in all copies of the
  8.  * software, derivative works or modified versions, and any portions
  9.  * thereof, and that both notices appear in supporting documentation.
  10.  *
  11.  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
  12.  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
  13.  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
  14.  *
  15.  * Carnegie Mellon requests users of this software to return to
  16.  *
  17.  *  Software Distribution Coordinator   or   Software.Distribution@CS.CMU.EDU
  18.  *  School of Computer Science
  19.  *  Carnegie Mellon University
  20.  *  Pittsburgh PA 15213-3890
  21.  *
  22.  * any improvements or extensions that they make and grant Carnegie the rights
  23.  * to redistribute these changes.
  24.  */
  25. /*
  26.  * Copyright (c) 1989 The Regents of the University of California.
  27.  * All rights reserved.
  28.  *
  29.  * Redistribution and use in source and binary forms are permitted provided
  30.  * that: (1) source distributions retain this entire copyright notice and
  31.  * comment, and (2) distributions including binaries display the following
  32.  * acknowledgement:  ``This product includes software developed by the
  33.  * University of California, Berkeley and its contributors'' in the
  34.  * documentation or other materials provided with the distribution and in
  35.  * all advertising materials mentioning features or use of this software.
  36.  * Neither the name of the University nor the names of its contributors may
  37.  * be used to endorse or promote products derived from this software without
  38.  * specific prior written permission.
  39.  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
  40.  * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
  41.  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  42.  *
  43.  *    @(#)time.h    5.6 (Berkeley) 6/23/90
  44.  */
  45. /* 
  46.  * HISTORY
  47.  * 20-Sep-90  Mary Thompson (mrt) at Carnegie-Mellon University
  48.  *    Taken from 4.3-reno-source to get the new copyright, but
  49.  *    removed the features that Mach is not supporting yet.
  50.  *
  51.  */
  52.  
  53. #ifndef _TIME_H_
  54. #define _TIME_H_ 1
  55.  
  56. struct tm {
  57.     int    tm_sec;        /* seconds after the minute [0-60] */
  58.     int    tm_min;        /* minutes after the hour [0-59] */
  59.     int    tm_hour;    /* hours since midnight [0-23] */
  60.     int    tm_mday;    /* day of the month [1-31] */
  61.     int    tm_mon;        /* months since January [0-11] */
  62.     int    tm_year;    /* years since 1900 */
  63.     int    tm_wday;    /* days since Sunday [0-6] */
  64.     int    tm_yday;    /* days since January 1 [0-365] */
  65.     int    tm_isdst;    /* Daylight Savings Time flag */
  66.     long    tm_gmtoff;    /* offset from CUT in seconds */
  67.     char    *tm_zone;    /* timezone abbreviation */
  68. };
  69.  
  70. #if __STDC__ || c_plusplus
  71. extern struct tm *gmtime(const time_t *);
  72. extern struct tm *localtime(const time_t *);
  73. extern time_t mktime(const struct tm *);
  74. extern time_t time(time_t *);
  75. extern double difftime(const time_t, const time_t);
  76. extern char *asctime(const struct tm *);
  77. extern char *ctime(const time_t *);
  78. extern char *timezone(int , int);
  79. extern void tzset(void);
  80. extern void tzsetwall(void);
  81. #else
  82. extern struct tm *gmtime();
  83. extern struct tm *localtime();
  84. extern time_t mktime();
  85. extern time_t time();
  86. extern double difftime();
  87. extern char *asctime();
  88. extern char *ctime();
  89. extern char *timezone();
  90. extern void tzset();
  91. extern void tzsetwall();
  92. #endif 
  93.  
  94. #endif /* _TIME_H */
  95.